public class Student {
    private String name;
    private int age;
    public String getName(String 小明){
        return  name;
    }
    public void setName(String name){
        this.name=name;
    }
    public int getAge(int i){
        return age;
    }
    public void setAge(int age){
        this.age=age;
    }                                        //被private修饰的成员变量，在其它类中要想访问只能手动提供get和set方法作为公开接口进行访问
    public void eat(){
        System.out.println(this.name+"正在吃饭");
    }
    public void sleep(){
        System.out.println(this.name+"正在睡觉");
    }
    public void show(){
        System.out.println("name:"+this.name+"age:"+this.age);
    }
}



